package TravelAgent;

public class Itinerary {
	private String hotel;
	private String activity;
	
	public Itinerary() {}
	
	public Itinerary(String hotel, String activity)
	{
		this.hotel = hotel;
		this.activity = activity;
	}
	
	public void SetItinerary(boolean isMyChoice, String date, String hotel, String activity)
	{
		this.hotel = hotel;
		this.activity = activity;
	}
	
	public String GetHotel()
	{
		return hotel;
	}
	
	public String GetActivity()
	{
		return activity;
	}
	
	public String ConCatItinerary()
	{
		return hotel.concat(":" + activity);
	}
	
	//sablon isMyChoice:date:hotel:activity (ekreme)
	public void SplitItinerary(String s)
	{
		String[] array = s.split(":");
		if (array.length != 2)
			System.out.println("bilgi yanlis gelmis");  //bunu yönet istersen!! ekrem dogru gondersin alamazsam zaten exception atýyorum
		hotel = array[0];
		activity = array[1];
	}
}
